package com.dk.job;

import com.dk.controller.TAuctionController;
import com.dk.pojo.TAuction;
import com.dk.service.ITAuctionService;
import org.quartz.*;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;

public class auctionJob implements Job {

    @Autowired
    private ITAuctionService auctionService;

    @Override
    public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
        List<TAuction> list = auctionService.list();
        TAuctionController auctionController = new TAuctionController();
        for (TAuction auction : list) {
            auctionController.getAdmin(auction.getId());
        }
    }
}
